<%@page import="org.xmldb.api.DatabaseManager"%>
<%@page import="org.xmldb.api.base.Collection"%>
<%@page import="org.xmldb.api.base.Database"%>
<%@page import="org.xmldb.api.base.Resource"%>
<%@page import="org.xmldb.api.base.ResourceIterator"%>
<%@page import="org.xmldb.api.base.ResourceSet"%>
<%@page import="org.xmldb.api.modules.XPathQueryService"%>

<%     
        String driver = "org.exist.xmldb.DatabaseImpl"; 
        Class cl = Class.forName(driver);
        Database database = (Database) cl.newInstance();
        database.setProperty("create-database", "true");
        DatabaseManager.registerDatabase(database); 
        Collection col = DatabaseManager.getCollection("xmldb:exist://localhost:8899/exist/xmlrpc/BD/", "admin", "123");
        XPathQueryService service = (XPathQueryService) col.getService("XPathQueryService", "1.0");
        service.setProperty("pretty", "true");
        service.setProperty("encoding", "UTF-8");
        String Usuario="FMSORI";
        String Clave="123";
        ResourceSet result = service.query("for $b in doc('Schema.xml')//HVDocentes/Usuario where $b/Usuario = '"+Usuario+"'return $b/nombre/apellido");
        ResourceIterator i = result.getIterator();
        System.out.println("..::"+result.getSize()+"::.."+i);
        while (i.hasMoreResources()) 
        {
            Resource r = i.nextResource();
            System.out.println("hola: "+(String) r.getContent());
        }
%>

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/document_iterator.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/find_proxy.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/get_html_text.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/global_constants.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/name_injection_builder.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/number_injection_builder.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/string_finder.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/change_sink.js"></script><meta name="document_iterator.js"><meta name="find_proxy.js"><meta name="get_html_text.js"><meta name="global_constants.js"><meta name="name_injection_builder.js"><meta name="number_injection_builder.js"><meta name="string_finder.js"><meta name="change_sink.js"></head>

<body>
<table width="100%" height="300" border="0" cellspacing="0" cellpadding="0">
<tbody><tr valign="middle"><td align="center">

<table width="297" height="152" border="1" cellpadding="4" cellspacing="2" bgcolor="#ddddbb">
        <tbody><tr>
    <td width="281" height="70" valign="top">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tbody><tr>
                <td align="center"><strong><font color="#006600" size="2" face="Arial, Helvetica, sans-serif">Oficina 
                  de Admisiones y Registro. </font><font color="#006600" size="2" face="Arial, Helvetica, sans-serif">Acceso 
                  a Docentes</font></strong></td>
                <td width="80"><img src="logo_docente.gif" width="68" height="56"></td>
        </tr>
      </tbody></table>
      </td>
  </tr>
  <tr>
    <td align="center" valign="middle">
      <form method="post" name="form1" action="http://siw.unillanos.edu.co/ull_insc_web/presentac/val_psw.jsp?tipo=1" onsubmit="return valide(this);">
              <table width="100%" border="0" cellspacing="8" cellpadding="0">
                <tbody><tr>
                  <td><strong><font size="2">Usuario</font></strong></td>
          <td><input name="user" type="text" size="10"></td>
        </tr>
        <tr>
                  <td><strong><font size="2">Clave</font></strong></td>
          <td><input name="pswd" type="password" size="10"></td>
        </tr>
        <tr>
          <td colspan="2" align="center">
          <input type="submit" value="Ingresar">
          </td>
        </tr>
      </tbody></table>
          <input type="hidden" name="tipo" value="1">
      </form>
      </td>
  </tr>
</tbody></table>
      </td>
  </tr>
</tbody></table>
</body>
    <span id="skype_highlighting_settings" display="none" autoextractnumbers="1"></span>
    <object id="skype_plugin_object" location.href="http://web.unillanos.edu.co/system/acessd.html" location.hostname="web.unillanos.edu.co" style="position: absolute; visibility: hidden; left: -100px; top: -100px; " width="0" height="0" type="application/x-vnd.skype.click2call.chrome.5.7.0"></object>
</html>